<template>
  <h2>Producer组件：</h2>
  <button @click="emitEvent">发送emitter事件</button>
</template>

<script setup>
import {emitter} from "./MittInstance.js";


const emitEvent = () => {
  // 发送事件
  emitter.emit('yourCustomEventType', {message: '你好，我是 Producer 组件'})
  console.log('事件已发送')
}

</script>

<style scoped>

</style>